#pragma once
#include <iostream>
#include <vector>
#include <cstring>
#include <string>
#include <cstdio>


#define SEP 'X'
#define SEP_LEN sizeof(SEP)

#define CRLF "\r\n"
#define CRLF_LEN strlen(CRLF) // 坑：sizeof(CRLF)
#define SPACE " "
#define SPACE_LEN strlen(SPACE)

struct Request
{
    int x;
    int y;
    char op;
};

struct Response
{
    int result;
    int code;
};

// 1 + 1, 2 * 4, 5 * 9, 6 *1

bool Parser(std::string, Request* req)
{
    
}

//分割报文
void PackageSplit(std::string& inbuff, std::vector<std::string>* result)
{
    while(true)
    {
        std::size_t pos = inbuff.find(SEP);
        if(pos == std::string::npos) break;
        result->push_back(std::move(inbuff.substr(0,pos)));
        inbuff.erase(0,pos+SEP_LEN);
    }
}